package com.lzg.designdrinciples.openclose;

import java.util.concurrent.CountDownLatch;

/**
 * @Author lizhigang Date: 2019/9/8 20:44
 * @description:
 */
public class OpenCloseTest {
    public static void main(String[] args) {
        //正常查询学习某一课程的方法：
        ICourse course = new JavaCourse(1,"Java编程思想",1000.00);
        System.out.println("学习"+course.getName()+"的价格为："+course.getPrice()+"元");

        //现在要查询优惠价：
//        ICourse YHCurse = new JavaDiscountCourse(1,"Java编程思想",1000.00);
//        System.out.println("学习"+YHCurse.getName()+"的价格为："+YHCurse.getPrice()+"元");

    }



}
